#include <stdio.h>
int main(void)
{
	int score=0;
	char none='\0';
	printf("请输入分数：");
	scanf("%d",&score);
	scanf("%c",&none);
	//while(getchar()!='\n');
	//if(getchar!='\0')   //\0为字符串结尾
	int choose=0;
	if(none!='\n')
	{
		printf("你输入的是个字符！\n");
	}
	else if(score<=100 && score>=0)
	{
		choose=score/10;
		switch(choose)
		{
		//case内的内容越简单越好
		//case内不允许定义变量
			case 10:             //case后面必须跟常量　还有冒号！
				printf("S！\n");
				break;           //跳出当前循环{}
			case 9:
				printf("A！\n"); //不允许int a=10 定义变量
				break;
			case 8:
				printf("B！\n");
				break;
			case 7:
				printf("C！\n");
				break;
			case 6:
				printf("D！\n");
				break;
			default:             //default不可少，哪怕没有执行语句
				printf("E!\n");
				break;
		}
	}
	else
	{
		printf("这个分数有误！\n");
	}
	return 0;
}
